import request from '@/utils/request';

// 查询云服务器列表
export function listCloudServer(query) {
  return request({
    url: '/system/relation/list',
    method: 'post',
    data: query
  })
}

// 云服务器开机
export function openCloudServer(query) {
  return request({
    url: '/cloud/control/batchStartServers',
    method: 'post',
    data: query
  })
}

// 云服务器关机
export function stopCloudServer(query) {
  return request({
    url: '/cloud/control/batchStopServers',
    method: 'post',
    data: query
  })
}

// 云服务器重启
export function restartCloudServer(query) {
  return request({
    url: '/cloud/control/batchRebootServers',
    method: 'post',
    data: query
  })
}